 <meta charset="utf-8">
 <div class="box" id="biz_signup_conatainer">
            <div class="box-header with-border">
               <form id="searchForm" role="form" class="form-inline">
                    <div class="form-group">
                         <label>姓名</label>
                         <input name="memberName" v-model="searchForm.memberName"   type="text" placeholder="" class="form-control">
                    </div>
                    <div class="form-group">
                    <label>手机号</label>
                         <input name="roleCode" v-model="searchForm.phone"  id="phone" type="text" placeholder="" class="form-control">
                    </div>
                     <div class="form-group" >
					 <label>邮箱</label>
						 <input name="roleCode" v-model="searchForm.email"  id="email" type="text" placeholder="" class="form-control">
					</div>
                     <div class="form-group">
                    <label>审核状态</label>
                          <select class="form-control"  v-model="searchForm.status"  name="status" >
                        		  <option value="">请选择</option>
                                  <option value="1">未审核</option>
                                  <option value="3">审核通过</option>
                                  <option value="4">审核未通过</option>
                           </select>
                    </div>
                  <button type="button"  class="btn btn-default pull-right m-t-n-xs" v-on:click="doexport();"><strong>导出</strong></button>
                     <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                     <button type="button"  class="btn btn-info pull-right m-t-n-xs" v-on:click="search();"><strong>查询</strong></button>
                   
                     
                    
                </form>
            </div>
 <div class="box-body">
 	<div class="row">
 	  <div class="col-md-12">
 	                           <div class="btn-group " id="signupBootstrapTableToolbar" role="group">
                                     <button type="button" class="btn btn-default" v-on:click="setOk">
                                        <i class="glyphicon glyphicon-ok" aria-hidden="true"></i> 审核通过
                                    </button>
                                     <button type="button"  class="btn btn-default" v-on:click="setNo">
                                        <i class="glyphicon glyphicon-remove" aria-hidden="true"></i>审核不通过
                                    </button>
                           </div>
                                
           <table id="signupBootstrapTable" data-mobile-responsive="true" ></table>
 	  </div>
 	</div>
 </div>
 </div>

<script> 
new Vue({  
	  el: '#biz_signup_conatainer',  
	  data:{
		  searchForm:{
			  memberName: null,
			  phone: null,
			  email: null,
			  status: null
		  },
		  bus:new Vue(),
	  },
	  mounted:function(){
		  
		 var _this=this;
		 this.initTable();
	  },
  methods: {
	
	  initTable:function(){
		  let columns=[
				{checkbox:true},
				{field:'memberName',title:'姓名',width:160},
				{field:'phone',title:'电话',width:160},
				
				{field:'email',title:'邮箱',width:100},
				{field:'companyName',title:'公司名',width:200},
				{field:'postName',title:'职位名',width:100},
				{field:'signupTime',title:'报名时间',width:100},
				{field:'status',title:'状态',width:100,formatter:this.formatStatus}
				];
		  let url="metting/ma/signup/loadMetMettingDataSet";
  		zfesBstable.laodTable($("#signupBootstrapTable"),$("#searchForm"),$("#signupBootstrapTableToolbar"),url,columns,this.searchForm);
	  },
	  search:function(){
		  zfesBstable.reload($("#signupBootstrapTable")); 
	  },
	  refresh:function(){
		  zfesBstable.refresh($("#signupBootstrapTable"));
	  },
	  setOk:function(){
		  if(zfesBstable.isSelectedRow($("#signupBootstrapTable"))){
			  var ids=zfesBstable.getRowIds($("#signupBootstrapTable"));
			  var　_this=this;
				 alertSwal.confirm("审核通过","是否执行该操作",function(){
						    let ajaxUrl = "metting/ma/signup/auditSignup";
						    zfesAjax.ajaxTodo(ajaxUrl, { "ids" : ids,"status":3}, function(data) {
								alertSwal.successText(data.message);
								_this.refresh();
							});
						});
		  }
	  },
	  setNo:function(){
		  if(zfesBstable.isSelectedRow($("#signupBootstrapTable"))){
			  var ids=zfesBstable.getRowIds($("#signupBootstrapTable"));
			  var　_this=this;
				 alertSwal.confirm("审核不通过","是否执行该操作",function(){
						    let ajaxUrl = "metting/ma/signup/auditSignup";
						    zfesAjax.ajaxTodo(ajaxUrl, {"ids" : ids,"status":4}, function(data) {
								alertSwal.successText(data.message);
								_this.refresh();
						});
		  		});
		  }
	  },

	  doexport: function(){
		  var　_this=this;
		  
		  zfesAjax.ajaxDownload("metting/ma/signup/exportExcel",_this.searchForm,"get");
	  },
	  formatStatus:function(value,row,index){
		  //#1报名成功，2已缴费，3审核通过，4审核不通过，-1移除 #
			if("1"==value||1==value){
				return '<span class="label label-warning">未审核</span>';
			}else if("3"==value||3==value){
				return '<span class="label label-success">审核通过</span>';
			}else if("4"==value||4==value){
				return '<span class="label label-danger">未通过</span>';
			}else{
				return value;
			}
			
		},
 	
 }

});
</script>


